
/*文件取值  包含图片 全部转换为文件*/
function contactAdd() {
    let forData = new FormData();
    forData.append("companyName",$("#companyName").val());
    forData.append("adress",$("#adress").val());
    forData.append("phone", $("#phone").val());//文件取值
    forData.append("email",$("#email").val());
    forData.append("fax",$("#fax").val());
    forData.append("qrCode",$("#qrCode")[0].files[0]);
    $.ajax({
        url: '/back/company/contactAdd',
        data: forData,
        contentType:false,
        processData:false,
        type: 'post',
        dataType: 'json',
        success: function (data) {
            if (data.result === 1) {
                alert("提交成功");
                $("#right").load('/back/company/contactManage.html');
            } else {
                alert("提交失败")
            }
        }
    })
}
function cancelContactAdd() {
    $("#right").load('/back/company/contactManage.html');
}